package kunsch.bexp;

import kunsch.bexp.visitor.Visitor;

public class Variable extends Expression
{

	private String description;

	public Variable(String description)
	{
		this.setDescription(description);
	}

	@Override
	public String toString()
	{
		return getDescription();
	}

	@Override
	public void accept(Visitor v)
	{
		v.visit(this);
	}

	public String getDescription()
	{
		return description;
	}

	public void setDescription(String description)
	{
		this.description = description;
	}

	@Override
	public boolean equals(Object that)
	{
		if(that instanceof Variable)
		{
			Variable thatVar = (Variable) that;
			return thatVar.description.equals(this.getDescription());
		}
		return false;
	}

}
